/**
* @file app_sensor.h in InsCubeBsp
* @author linfe
* @comment
* Create on 2023/1/31 23:51
* @version 1.0
**/

#ifndef INSCUBEBSP_CORE_SRC_APP_COMMON_APP_SENSOR_H_
#define INSCUBEBSP_CORE_SRC_APP_COMMON_APP_SENSOR_H_
#include "app_config.h"


#if APP_CONFIG_IMU == 0
#include "imu_icm20602.h"
typedef  icm2060x_error_t imu_error_t;
typedef icm2060x_handle_t imu_handle_t;
typedef imu_raw_icm_t imu_raw_t;
#elif APP_CONFIG_IMU == 1
#include "imu_adis1646x.h"
typedef  adis1646x_error_t imu_error_t;
typedef adis1646x_handle_t imu_handle_t;
typedef imu_raw_adi_t imu_raw_t;
#endif

typedef struct {
  imu_handle_t imu_handle;
  imu_error_t (*init_func)(imu_handle_t *imu_handle);
  imu_error_t (*imu_read)(imu_handle_t *imu_handle,imu_raw_t *data);
}imu_sensor_act_t;

extern imu_sensor_act_t imu_sensor_act;

imu_error_t imu_init(imu_sensor_act_t *imu_handle);

imu_error_t imu_read(imu_sensor_act_t *imu_handle,imu_raw_t* data);

#endif //INSCUBEBSP_CORE_SRC_APP_COMMON_APP_SENSOR_H_
